package pers.zc.activiti.thread.demo;

/**
 * @description runnable测试类
 * @Author Lin FuYuan
 * @date 2020/4/17
 */
public class RunnableClass2  extends Thread {
    @Override
    public void run() {
        for (int i = 0; i <100 ; i++) {
            if(Thread.interrupted()){
                System.out.println("线程终止");
                return;
            }
            try {
                Thread.sleep(1000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
            System.out.println("RunnableClass2: "+Thread.currentThread().getName()+" -> "+ i);
        }
    }
}
